package com.shy.springframework.util;

/**
 * @author yzpang
 * @desc: 类加载工具
 * @date: 2023/2/8 9:23
 */
public class ClassUtils {

    /**
     * 获取当前默认的类加载器
     * @return
     */
    public static ClassLoader getDefaultClassLoader(){
        ClassLoader cl = null;

        cl = Thread.currentThread().getContextClassLoader();
        if (cl == null){
            cl = ClassUtils.class.getClassLoader();
        }
        return cl;
    }
}
